<form action="baseinfo.manage.php?action=del" method="post" name="form_del" id="form_del">
<table border="0" cellpadding="0" cellspacing="0" class="from_table2 top-1">
	<thead>
		<tr class="area_ajax_list_title">
		  <td class="pd-left" align="left" valign="middle"><strong>
		    <tpl> $langBSelect </tpl>
		    </strong></td>
		  <td align="left" valign="middle"><strong>
		    <tpl> $langBPayType </tpl>
		    </strong></td>
		  <td align="left" valign="middle"><strong>
		    <tpl> $langBIco </tpl>
		    </strong></td>
		  <td align="left" valign="middle"><strong>
		    <tpl> $langBBank </tpl>
		    </strong></td>
		  <td align="left" valign="middle"><strong>
		    <tpl> $langBAccounts </tpl>
		    </strong></td>
		  <td align="left" valign="middle"><strong>
		    <tpl> $langBConsignee </tpl>
		    </strong></td>
		  <td align="left" valign="middle"><strong>
		    <tpl> $langCOperation </tpl>
		    </strong></td>
		</tr>
	</thead>
	<tpl> if $pay_info[0].pay_id neq '' </tpl>
		  <tpl> section name=i loop=$pay_info </tpl>
	<tr>
	  <td  align="left" valign="middle" class="td rowform pd-left"><input name="pay_id[]" type="checkbox" value="<tpl> $pay_info[i].pay_id </tpl>"/></td>
	  <td align="left" valign="middle" class="td rowform"><tpl> $langBLineDownPay </tpl></td>
	  <td align="left" valign="middle" class="td rowform"><tpl> if $pay_info[i].pay_ico neq '' </tpl><img src="<tpl> $pay_info[i].pay_ico </tpl>" /><tpl> /if </tpl></td>
	  <td align="left" valign="middle" class="td rowform"><tpl> $pay_info[i].pay_name </tpl></td>
	  <td align="left" valign="middle" class="td rowform"><tpl> $pay_info[i].pay_account </tpl></td>
	  <td align="left" valign="middle" class="td rowform"><tpl> $pay_info[i].pay_consignee </tpl></td>
		<td align="left" valign="middle" class="td rowform"><a href="javascript:;" onclick="hideMessage();ajax_modi('<tpl> $pay_info[i].pay_id </tpl>');" title="<tpl> $langCedit </tpl>" class="edit_a_pic">
	  </a> </td>
	</tr>
		<tpl> /section </tpl>
	
	<tpl> else  </tpl>
	<tr>
		<td colspan="7"><tpl> $langCNull </tpl>！</td>
	</tr>
	<tr>
	<td colspan="7"><input type="button" class="btn_submit" value="<tpl> $langBAddLineDownAccounts </tpl>" onclick="add_pay()"/>
	</td>
	</tr>
	<tpl> /if </tpl>
</table>
<div class="table-5-bottom">
<div style="float:left; padding-left:20px">
		<span class="btn_left">
		<input name="selectall" type="button" id="selectall" value="<tpl> $langCAllSelect </tpl>" class="btn_submit"/>
		</span>
		<span class="btn_left">
		<input name="negative" type="button" id="negative" value="<tpl> $langCAllNotSelect </tpl>" class="btn_submit"/>
		  </span>
		<span class="btn_left">
		<input id="delbutton" name="delbutton" value="<tpl> $langBDelSelect </tpl>" class="btn_submit" type="button"/>
		  </span>
		<span class="btn_left">
		<input type="button" class="btn_submit" value="<tpl> $langBAddLineDownAccounts </tpl>" onclick="add_pay()"/>
		  </span>
		
		</div>
		<div style="float:right; padding-right:20px">
		<tpl> $page_list </tpl>		
		</div>
		</div>
</form>
<div id="question" style="display:none; cursor: default; padding:10px"> 
        <b style=" font-size:14px; margin-top:10px; line-height:50px; height:50px;padding-

top:10px; padding-bottom:10px"><tpl> $langCConfirmDelete </tpl></b> <br />
        <input type="button" id="yes" value="<tpl> $langCYes </tpl>"  style=" border:1px solid 

#CCCCCC;width:80px; margin:5px; background-image:url(../templates/system_new/images/anniu.gif)"/> 
        <input type="button" id="no" value="<tpl> $langCNo </tpl>"  style="border:1px solid #CCCCCC;width:80px; 

margin:5px; background-image:url(../templates/system_new/images/anniu.gif)"/>
		<input type="hidden" id="del_value" />
</div> 
<script language="javascript" type="text/javascript">
$(document).ready(function() {	
	$('#negative').click(
		function(){
			$('#form_del input[@type=checkbox]').each(function(){
				$(this).attr('checked',!$(this).attr('checked'))
			})
		}
	);
	$('#selectall').click(
		function(){
			$('#form_del input[@type=checkbox]').each(function(){
				$(this).attr('checked',true)
			})
		}
	);
	//删除操作
	var options_del = {
		beforeSubmit:  function(){showLoading(showText);},
		success:       function(msg){
						hideLoading();
						showMessage(msg.message,msg.type);
						if(msg.type == '1'){
							ShowDiv = "pay_list";
							getPageContent("baseinfo.manage.php?action=pay_list");
						}
					},
		type:      'post',
		dataType:  'json'
	};
	
	var question = $('#question')[0];
	$("#delbutton").click(function(){
		$.blockUI(question, { width: '275px' });
	});
	
	$('#yes').click(function() {
			$.unblockUI();
			$('#form_del').ajaxSubmit(options_del);	
			return false;
		});
	$('#no').click($.unblockUI);
});	

//添加
function add_pay(){
	//载入页面
	ShowDiv = "pay_list";
	getPageContent("baseinfo.manage.php?action=add");
}

//编辑
function ajax_modi(id){
	//载入页面
	ShowDiv = "pay_list";
	getPageContent("baseinfo.manage.php?action=modi&id="+id);
}
</script>